package com.adderis.soft.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.adderis.soft.domain.dao.InciDao;
import com.adderis.soft.domain.model.Inci;
import com.adderis.soft.service.IInciBo;

@Service("inciService")
@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public class InciServiceImpl implements IInciBo {


	@Autowired
	private InciDao inciDao;

	@Transactional(readOnly = false)
	public void persist(Inci transientInci) {
		inciDao.persist(transientInci);

	}

	@Transactional(readOnly = false)
	public void remove(Inci persistentInci) {
		inciDao.remove(persistentInci);

	}

	@Transactional(readOnly = false)
	public Inci merge(Inci detachedInci) {

		return inciDao.merge(detachedInci);
	}
	
	@Transactional(readOnly = false)
	public void remove(Integer id) {
		inciDao.remove(id);

	}

	public Inci findById(Integer id) {
		return inciDao.findById(id);
	}

	public List<Inci> findAll() {
		return inciDao.findAll();
	}

	public List<Inci> search(String searchString) {
		return inciDao.search(searchString);
	}

	

}
